'use strict';

/* 用户信息 - 数据模型 */
module.exports = app => {
  const ctx = app.createAnonymousContext();
  ctx.populate("roommsg", {
    room: "room"
  })
  return ctx.helper.model('roommsg', {
    user: {
      type: String,
      ref: "user"
    },
    room: {
      type: String,
      ref: "room"
    },
    message: {
      type: String,
      displayname: "发送的消息",
    },
    img: {
      type: String,
      displayName: "聊天图片"
    }
  });
};
